package model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class OrderList implements Serializable, Collection<Order> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1855002261666885450L;
	private List<Order> list;
	/**
	 * constructor
	 */
	public OrderList(){
		list = new ArrayList<Order>();
	}
	
	/**
	 * constructor
	 * @param size
	 */
	public OrderList(int size){
		list = new ArrayList<Order>(size);
	}
	
	/**
	 * constructor
	 * @param a collection of Orders 
	 */
	public OrderList(Collection<Order> c){
		list = new ArrayList<Order>(c);
	}
	
	/*
	 * inherited collection methods
	 */	
	@Override
	public boolean add(Order arg0) {
		return list.add(arg0);
	}

	@Override
	public boolean addAll(Collection<? extends Order> arg0) {
		return list.addAll(arg0);
	}

	@Override
	public void clear() {
		list.clear();
	}

	@Override
	public boolean contains(Object arg0) {
		return list.contains(arg0);
	}

	@Override
	public boolean containsAll(Collection<?> arg0) {
		return list.containsAll(arg0);
	}

	@Override
	public boolean isEmpty() {
		return list.isEmpty();
	}

	@Override
	public Iterator<Order> iterator() {
		return list.iterator();
	}

	@Override
	public boolean remove(Object arg0) {
		return list.remove(arg0);
	}

	@Override
	public boolean removeAll(Collection<?> arg0) {
		return list.removeAll(arg0);
	}

	@Override
	public boolean retainAll(Collection<?> arg0) {
		return list.retainAll(arg0);
	}

	@Override
	public int size() {
		return list.size();
	}

	@Override
	public Object[] toArray() {
		return list.toArray();
	}

	@Override
	public <T> T[] toArray(T[] arg0) {
		return list.toArray(arg0);
	}

}
